<?php 
    /**
     * Version 1.1
     * 18.11.2010
     */
?>
    <ul class="pagination">
  
    <!-- Previous page link -->            
    <?php if (isset($this->previous)):?>              
    <li><a id="zurueck" href="<?= $this->url(array('page' => $this->previous), $this->route); ?>">&laquo;</a></li>      
    <?php else: ?>            
        <li><span class="disabled">&laquo;</span></li>
    <?php endif; ?>
    
            <!-- Numbered page links -->                
<?php   
        $betweenNav = "";
        foreach ($this->pagesInRange as $page){
            if ($page != $this->current){ 
                $betweenNav .= "$('a#href$page').click(function()  { $.post('". $this->url(array('page' => $page, 'ajax' => 1), $this->route)."', {}, function(data, textStatus) { $('#col1_content').html(data); }, 'html');return false; });\n";
                
?>              <li><a id="href<?= $page ?>" href="<?= $this->url(array('page' => $page), $this->route); ?>"><?= $page; ?></a></li>         
         <?php }else{ ?>      
<li class="active"><?= $page; ?></li>
<?php
            }
        }
?>        
    
    <!-- Next page link -->        
    <?php if (isset($this->next)): ?>
        <li><a id="weiter" href="<?= $this->url(array('page' => $this->next), $this->route); ?>">&raquo;</a></li>
    <?php else: ?>
        <li><span class="disabled">&raquo;</span></li>     
    <?php endif; ?>
                
    </ul> 
